//
//  VMCPagedListDomain.h
//  vmcshop
//
//  Created by bigknife on 14-10-10.
//  Copyright (c) 2014年 idongler. All rights reserved.
//

#import "VMCBaseDomain.h"
#import "VMCPageInfo.h"

@interface VMCPagedListDomain : VMCBaseDomain
/**
 *  新建一个实例，约定itemsName为"items",pageInfoName为"pageInfo"
 *
 *  @param info  分页列表返回数据
 *  @param block block
 *
 *  @return 分页列表对象
 */
+(id) instanceFromListApiInfo:(NSDictionary *)info withItemsMapBlock:(id(^)(id item, NSInteger idx))block;

/**
 *  新建一个实例
 *
 *  @param info  分页列表返回数据
 *  @param block block
 *
 *  @return 分页列表对象
 */
+(id) instanceFromListApiInfo:(NSDictionary *)info
                withItemsName:(NSString *)itemsName
				 pageInfoName:(NSString *)pageInfoName
				  andMapBlock:(id(^)(id item, NSInteger idx))block;

@property (nonatomic,strong) VMCPageInfo *pageInfo;
@property (nonatomic,strong) NSArray *items;

/**
 *  添加分页列表接口返回数据，约定itemsName为"items",pageInfoName为"pageInfo"
 *
 *  @param info  分页列表返回数据
 *  @param block 接口回调
 */
-(void) appendFromListApiInfo:(NSDictionary *)info withItemsMapBlock:(id(^)(id item, NSInteger idx))block;

/**
 *  添加分页列表接口返回数据
 *
 *  @param info  分页列表返回数据
 *  @param block 接口回调
 */
-(void)appendFromListApiInfo:(NSDictionary *)info
               withItemsName:(NSString *)itemsName
                pageInfoName:(NSString *)pageInfoName
                 andMapBlock:(id (^)(id item, NSInteger idx))block;
@end
